// import Home from '@/pages/Home.vue'
// import Cart from '@/pages/Cart.vue'
// import Mine from '@/pages/Mine.vue'
// import ShopList from '@/pages/ShopList.vue'
// import Login from '@/pages/Login.vue'
// import productList from '@/pages/productList.vue'
// import product from '@/pages/product.vue'
// import detail from '@/pages/detail.vue'
// import comment from '@/pages/comment.vue'
import footer from '@/components/hq-footer.vue'
// import header from '@/components/hq-header.vue'
// import cartheader from '@/components/CartHeader.vue'
const Home = () => import('@/pages/Home')
const Mine = () => import('@/pages/Mine')
const Cart = () => import('@/pages/Cart')
const ShopList = () => import('@/pages/ShopList')
const Login = () => import('@/pages/Login')
const productList = () => import('@/pages/productList')
const product = () => import('@/pages/product')
const detail = () => import('@/pages/detail')
const comment = () => import('@/pages/comment')
const header = () => import('@/components/hq-header')
const cartheader = () => import('@/components/CartHeader')
const loginheader = () => import('@/components/loginheader')
const pay = () => import('@/pages/pay')

const routes = [
  {
    path: '/',
    redirect: '/home'
  }, {
    path: '/shoplist',
    name: 'shoplist',
    components: {
      main: ShopList,
      footer: footer,
      header: header
    },
    children: [{
      path: ':id',
      name: 'category',
      components: {
        default: productList
      }
    }]
  }, {
    path: '/cart',
    name: 'cart',
    components: {
      main: Cart,
      footer: footer,
      header: cartheader

    }
  }, {
    path: '/home',
    name: 'home',
    components: {
      main: Home,
      footer: footer,
      header: header }
  }, {
    path: '/mine',
    name: 'mine',
    components: {
      main: Mine,
      footer: footer
    }
  }, {
    path: '/login',
    name: 'login',
    components: {
      header: loginheader,
      main: Login

    }
  }, {
    path: '/product/:id',
    name: 'product',
    components: {
      header: header,
      main: product

    },
    children: [{
      path: 'detail/:ID',
      name: 'detail',
      components: {
        default: detail
      }}, {
      path: 'comment/:com',
      name: 'comment',
      components: {
        default: comment
      }
    }]
  }, {
    path: '/pay',
    name: 'pay',
    components: {
      footer: footer,
      header: header,
      main: pay
    }
  }

]
export default routes
